package com.zytlifeservice.exception;

import com.zytlifeservice.enums.ResultEnum;

/**
 * Created by MJS on 2017/4/22.
 */
public class UserException extends RuntimeException{
    private int code;
    public UserException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public UserException(String message, int code) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}

